<!DOCTYPE html>
<html layout:decorator="components/layout" xmlns="http://www.w3.org/1999/xhtml"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
      xmlns:th="http://www.thymeleaf.org"
>
<head>
  <title>活跃URL</title>
</head>
<body>
<div
  layout:fragment="content"
  id="app" v-cloak
>
  <div class="container">
    <div class="myHeader">
      <div class="myHeader-title">
        活跃URL统计
      </div>
      <div class="myHeader-tool">

        <el-button type="primary" size="mini" icon="el-icon-search" @click="toggle">高级搜索</el-button>

        &nbsp;
        所在机房:
        <el-select v-model="form.houseId" @change="searchPage" placeholder="请选择" size="mini" clearable>
          <el-option v-for="house in houses" :label="house.houseName" :key="house.id" :value="house.id">
          </el-option>
        </el-select>

      </div>
    </div>

    <el-row>
      <el-form label-width="100px" class="container-search" v-show="formShow">
        <el-row :gutter="10">
          <el-col :span="9">
            <el-form-item label="应用IP:">
              <el-input
                v-model="form.ip"
                clearable
                show-word-limit
                maxlength="64"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="3">
            <el-form-item label-width="0">
              <rx-search-action
                v-model="form.ipAction"
              ></rx-search-action>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="首次采集时间:">
              <el-date-picker
                v-model="form.timeArray"
                type="datetimerange"
                style="width: 100%"
                range-separator="至"
                start-placeholder="开始日期"
                end-placeholder="结束日期">
              </el-date-picker>
            </el-form-item>
          </el-col>

        </el-row>

        <div style="text-align:center; margin-bottom:20px">
          <el-button type="primary" size="medium" @click="searchPage">查 找</el-button>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          <el-button type="primary" size="medium" @click="resetPage">重 置</el-button>
        </div>
      </el-form>
    </el-row>

    <div>
      <template>
        <my-table
          :data="page.records"
          :columns="columns"
          @handle-selection-change="selection"
        >
          <template #url="row">
            <a
              :href="row.row.url"
            >{{urlSubString(row.row.url)}} </a>
          </template>
        </my-table>
        <div class="pagination">
          <div
            style="display: inline-block;font-size: 13px;font-weight: 400;color: rgb(96, 98, 102);margin-top: 7px;float: left;">
            当前页 <input v-model="page.current" style="border:none;" size="1" disabled/></div>

          <el-pagination
            background
            @size-change="changeSize"
            @current-change="goto"
            :current-page="page.current"
            :page-sizes="[10, 20, 30]"
            :page-size="page.size"
            layout="total, sizes, prev, next"
            :total="page.total"
          >
          </el-pagination>

        </div>
        <div class="pagination-tool">
          <el-button
            type="danger"
            size="mini"
            @click="deleteSelected"
            v-realm="'regulatory-log:slog-hot-url:edit'"
          >批量删除
          </el-button>
        </div>
      </template>

    </div>


  </div>
</div>
<div layout:fragment="js">
  <script src="/static/js/module/basic-data/api/baseHouseInfoApi.js"></script>
  <script src="/static/js/module/slog/api/slogHotUrlApi.js"></script>
  <script src="/static/js/module/slog/admin_active_url.js"></script>
</div>
</body>
</html>
